<div class="row-fluid sortable">
	<div class="box span12">
		<div class="box-header well" data-original-title>
			<h2><i class="icon-edit"></i> Add Siswa</h2>
			<div class="box-icon">
				<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
				<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
				<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
			</div>
		</div>
		<div class="box-content">
			<form class="form-horizontal" method='post' action='<?php echo base_url();?>index.php/soal/save/<?php echo $data['id_soal'];?>'>
			  <fieldset>
			  	<div class="control-group">
				  <label class="control-label" for="upload_soal_kelas">Jenjang</label>
				  <div class="controls">
					<select id="upload_soal_kelas">
						<option value="">Pilih Jenjang</option>
						<?php 
							foreach ($jenjang as $group_value) {
								echo "<optgroup label='".$group_value['jenjang_name']."'>";
									foreach ($kelas as $value) {
										if($data['kelas_id'] == $value['kelas_id']) $select = 'selected = selected';
										else $select = "";
										if($group_value['jenjang_id'] == $value['kelas_jenjang_id']) echo "<option value='".$value['kelas_id']."' $select>".$value['kelas_name']."</option>";
									}
								echo "</optgroup>";
							}
						?>
					</select>
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="upload_soal_bab">Mata Pelajaran</label>
				  <div class="controls">
					<select id="upload_soal_bab" name='bab_id' class="disabled" disabled="">
						<option value="">Pilih BAB</option>
						<?php 
							foreach ($pelajaran as $group_value) {
								echo "<optgroup label='".$group_value['pel_name']." - Semester ".$group_value['pel_semester']."' kelas='".$group_value['pel_kelas_id']."'>";
									foreach ($bab as $value) {
										if($data['bab_id'] == $value['bab_id']) $select = 'selected = selected';
										else $select = "";
										if($group_value['pel_id'] == $value['bab_pel_id']) echo "<option value='".$value['bab_id']."' pelajaran='".$value['bab_pel_id']."' $select>".$value['bab_name']."</option>";
									}
								echo "</optgroup>";
							}
						?>
					</select>
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">Pertanyaan</label>
				  <div class="controls">
					<input type="text" class="input-xlarge" name='pertanyaan' value='<?php echo $data['pertanyaan'];?>' />
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">A</label>
				  <div class="controls">
					<input type="text" class="input-xlarge" name='pilihan_a'  value='<?php echo $data['pilihan_a'];?>' />
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">B</label>
				  <div class="controls">
					<input type="text" class="input-xlarge" name='pilihan_b'  value='<?php echo $data['pilihan_b'];?>' />
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">C</label>
				  <div class="controls">
					<input type="text" class="input-xlarge" name='pilihan_c'  value='<?php echo $data['pilihan_c'];?>' />
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">D</label>
				  <div class="controls">
					<input type="text" class="input-xlarge" name='pilihan_d'  value='<?php echo $data['pilihan_d'];?>' />
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">E</label>
				  <div class="controls">
					<input type="text" class="input-xlarge" name='pilihan_e'  value='<?php echo $data['pilihan_e'];?>' />
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">Jawaban</label>
				   <div class="controls">
					<select name='jawaban'>
						<option>Pilih Jawaban</option>
						<option value='A' <?php echo (strtoupper($data['jawaban']) == 'A')? 'selected = selected' : '' ?>>A</option>
						<option value='B' <?php echo (strtoupper($data['jawaban']) == 'B')? 'selected = selected' : '' ?>>B</option>
						<option value='C' <?php echo (strtoupper($data['jawaban']) == 'C')? 'selected = selected' : '' ?>>C</option>
						<option value='D' <?php echo (strtoupper($data['jawaban']) == 'D')? 'selected = selected' : '' ?>>D</option>
						<option value='E' <?php echo (strtoupper($data['jawaban']) == 'E')? 'selected = selected' : '' ?>>E</option>
					</select>
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">Publish</label>
				  <div class="controls">
					<select id="selectError3" name='publish'>
						<option value='yes'<?php if($data['publish'] =='yes') echo 'selected=selected'?>>Yes</option>
						<option value='no' <?php if($data['publish'] =='no') echo 'selected=selected'?>>No</option>
					</select>
				  </div>
				</div>
				<div class="form-actions">
				  <button type="submit" class="btn btn-primary">Save changes</button>
				  <a href="<?php echo base_url();?>index.php/soal" class="btn">Cancel</a>
				</div>
			  </fieldset>
			</form>   
		</div>
	</div><!--/span-->
</div><!--/row-->